﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Oracle.DataAccess.Client;
using System.Collections;

namespace TP2
{
    public partial class MainForm : Form
    {
        Form frCon;

        ArrayList number = new ArrayList();
        ArrayList proc = new ArrayList();
        ArrayList start_date = new ArrayList();
        ArrayList finish_date = new ArrayList();
        ArrayList deposit = new ArrayList();
        ArrayList update_date = new ArrayList();

        public MainForm(Form fr)
        {
            InitializeComponent();
            
            frCon = fr;
            
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            ///this.BackgroundImage= (Image.FromFile("фон.jpg"));
            Graphics f = pictureBox1.CreateGraphics();
            Graphics gr;
            Bitmap bm;
            bm = new Bitmap(pictureBox1.Width, pictureBox1.Height);
            gr = Graphics.FromImage(bm);
            Image[] fon = new Image[1];
            fon[0]=Image.FromFile("Mmmlogo.jpg");
            gr.DrawImage(fon[0], 0, 0);
            f.DrawImage(bm, 0, 0);
            f.Dispose();
            DBWorkClass dbWork = new DBWorkClass();
            dbWork.UpdateAccumulationDeposit();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            PhysicalClient physFr = new PhysicalClient();
            physFr.Show();
            
        }

       

        private void btnClose_Click(object sender, EventArgs e)
        {
            frCon.Close();
        }

        

        private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            frCon.Close();
        }

        private void btnRate_Click(object sender, EventArgs e)
        {
            RateForm rateFr = new RateForm();
            rateFr.Show();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            LegalClientForm legalFr = new LegalClientForm();
            legalFr.Show();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            BankClientForm bankForm = new BankClientForm();
            bankForm.Show();
        }

       
    }
}
